Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

  • Espresso: Minor warning cleanups

  • Espresso: Move VM-side jvmci package to impl package
    This avoids conflict with the guest JVMCI package

  • Native-Image: Simplify NativeImageClassLoader.initRemotePackageMap

  • Introduce VMAccess API
    The VMAccess API can be used to retrieve JVMCI and Graal compiler providers that reflect the state of a JVM. VMAccess.Builder can be used to create such a JVM based on a class path, module path etc.

    This commit adds 2 implementations of VMAccess.Builder that can be looked up via service loaders:

    • A "host" VMAccess which reflects on the host JVM similar to how the native-image builder works today.
    • A "espresso-context" VMAccess which creates and reflects on an espresso context.

    The implementation of the espresso context vm access is partial and is done as a refactoring of Espresso's existing "internal" JVMCI implementation.

    • On the JVMCI side, the main espresso JVMCI implementation classes are turned into abstract classes that are extended by 2 sublasses:
      one for internal JVMCI which works as before via substitutions of native methods;
      and one for the new external JVMCI which is implemented via polyglot interop.
    • In espresso, some common code is moved from the existing substitution classes to some *Util classes. External JVMCI works over interop so some existing classes now implement interop and a number of new interop wrappers to util objects are introduced.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 20, 2025
The `VMAccess` API can be used to retrieve JVMCI and Graal compiler
providers that reflect the state of a JVM. `VMAccess.Builder` can be
used to create such a JVM based on a class path, module path etc.

This commit adds 2 implementations of `VMAccess.Builder` that can be
looked up via service loaders:
* A "host" VMAccess which reflects on the host JVM similar to how the
  native-image builder works today.
* A "espresso-context" VMAccess which creates and reflects on an
  espresso context.

The implementation of the espresso context vm access is partial and is
done as a refactoring of Espresso's existing "internal" JVMCI
implementation.
* On the JVMCI side, the main espresso JVMCI implementation classes are
  turned into abstract classes that are extended by 2 sublasses: one for
  internal JVMCI which works as before via substitutions of native
  methods; and one for the new external JVMCI which is implemented via
  polyglot interop.
* In espresso, some common code is moved from the existing substitution
  classes to some *Util classes. External JVMCI works over interop so
  some exisiting classes now implement interop and a number of new
  interop wrappers to util objects are introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants